package finalgame.Graphics;

import java.util.UUID;

/**
 * Base class for all renderable objects
 */
public abstract class Renderable implements RenderObj {
	protected Location myLoc; // Location to render at
	protected String renderID; // ID (used to identify in RenderEngine)
	protected String name; // Name (used to get textures)

	public Renderable() { // Generate random UUID
		renderID = UUID.randomUUID().toString();
	}

	/**
	 * Get location to render at
	 */
	public Location getLocation() {
		return myLoc;
	}

	/**
	 * Render
	 * To be implemented in sub classes
	 */
	public abstract void render();

	public String getRenderID() {
		return renderID;
	}

	public String getFront() {
		return name + ".front";
	}

	public String getBack() {
		return name + ".back";
	}

	public String getOther(String c) {
		return name + "." + c;
	}
}
